package com.coocaa.x.app.hall;

import com.coocaa.x.app.framework.app.LiteAppApplication;
import com.coocaa.x.framework.app.CoocaaApplication;
import com.coocaa.x.service.XServiceManager;
import com.facebook.drawee.backends.pipeline.Fresco;

/**
 * Created by luwei on 15-6-16.
 */
public class HallApplication extends LiteAppApplication {

    private static boolean isInitFresco = false;

    @Override
    public void onCreate() {
        super.onCreate();

        post(new Runnable() {
            @Override
            public void run() {
                XServiceManager.registerService(getPackageName(), "com.coocaa.x.service.litedownloader2");
            }
        });
    }

    public static void initFresco() {
        if (!isInitFresco) {
            Fresco.initialize(CoocaaApplication.getContext());
            isInitFresco = true;
        }
    }
}
